package com.yly.test1

import android.app.Activity
import android.content.Context
import android.content.Intent
import android.os.Bundle

class ActivityManager : Activity() {
    private var appended = false

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val shp = getSharedPreferences("user", Context.MODE_PRIVATE)
        appended = shp.getBoolean("appended", false)
        if (appended) {
            val intent =
                Intent().apply { setClass(this@ActivityManager, CampusNetWorkActivity::class.java) }
            startActivity(intent)
        } else{
            val intent =
                Intent().apply { setClass(this@ActivityManager, LoginActivity::class.java) }
            startActivity(intent)
        }
        finish()
    }
}